﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BGCMS.Models.VaccinationLog>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Bólusetningar
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="leftside">
    <h2>Barnið mitt</h2>
        <ul>
            <li>
                <%: Html.ActionLink("Skrá barn", "CreateChild", "Child") %></li>
            <li>
                <%: Html.ActionLink("Breyta barni", "EditChild", new { id = Model.FirstOrDefault().ChildID}) %></li>
            <li>
                <%: Html.ActionLink("Tímalína barns", "Child", new { id = Model.FirstOrDefault().ChildID })%></li>
            <li>
                <%: Html.ActionLink("Heilsufarsskrá", "HealthLog", new { id = Model.FirstOrDefault().ChildID })%></li>
            <li>
                <%: Html.ActionLink("Bólusetningar", "VaccinationLog", new { id = Model.FirstOrDefault().ChildID })%></li>
            <li>
                <%: Html.ActionLink("Tímapantanir", "AppointmentLog", new { id = Model.FirstOrDefault().ChildID })%></li>
            <li>
                <%: Html.ActionLink("WHO kúrva","Graph","Home") %></li>
        </ul>
    </div>
    <div id="content">
        <h2>
            Bólusetningar barns</h2>
        <p>
            <a href="http://www.landlaeknir.is/pages/856" target="_blank">Upplýsingar um bólusetningar
                barna</a></p>
        <table class="tafla">
            <thead>
                <tr>
                    <th>
                        Dagsetning
                    </th>
                    <th>
                        Sjúkdómur
                    </th>
                    <th></th>
                    <th></th>
                </tr>
            </thead>
            <tbody>
                <% foreach (var v in Model)
                   { %>
                <tr>
                    <td>
                        <%: v.DateOfV.ToString("dd/MM/yyyy") %>
                    </td>
                    <td>
                        <%: v.Disease %>
                    </td>
                    <td>
                        <%: Html.ActionLink("Breyta", "EditVaccinationLogItem", new { v.ID }) %>
                    </td>
                    <td>
                        <%: Html.ActionLink("Eyða", "DeleteVaccinationLogItem", new { v.ID }) %>
                    </td>
                </tr>
                <% } %>
            </tbody>
        </table>
        <p>
            <%: Html.ActionLink("Skrá nýja bólusetningu", "CreateVaccinationLogItem", new { id = Model.FirstOrDefault().ChildID }) %>
        </p>
    </div>
</asp:Content>